﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Category>" %>

<li>

<%= Html.ActionLink(Model.Name, "EditCategory", "Admin", new { catId = Model.Id }, new { @class = "categorytreelink" })%>
    
<%
if(Model.Categories.Count > 0)
{
%>
<ul>
    <% foreach (Category c in Model.Categories)
       {
           Html.RenderPartial("~/Views/Admin/Controls/CategoryItem.ascx", c);
       }
    %>
</ul>
<%
}
%>
</li>